<?php
/**
 * @author zhaofei
 * @package 产品类别model 
 * @createtime 2014-11-27
 * @updatetime 2014-11-27
 * @ps:no
 */
namespace System\Model;
use Think\Model;
class ProductsClassModel extends Model{

	protected $_validate =array(
		array('name','require','类名不能为空',1),
	);
	
	protected $_auto = array(
		
	);
	
	//获取分类id
	public function getIdByCons($cons){
		$rs = D('ProductsClass')->field('id')->where($cons)->find();
		if($rs['id']){
			return $rs['id'];
		}else{
			return false;
		}
	}

		

	 

	 
}
?>